package com.yuexun.beilunpatient.ui.login.api;


import com.yuexun.beilunpatient.ui.bean.BaseListEntity;
import com.yuexun.beilunpatient.ui.login.bean.LoginBean;
import com.yuexun.beilunpatient.ui.login.bean.RegisterBean;
import com.yuexun.beilunpatient.ui.login.bean.SmsBean;
import com.yuexun.beilunpatient.ui.login.bean.UserDtlBean;

import java.util.Map;

import retrofit.http.FieldMap;
import retrofit.http.FormUrlEncoded;
import retrofit.http.POST;
import rx.Observable;

/**
 * Created by chenss on 2018/3/14 0014.
 */

public interface LoginApi {
    /**
     * 登录
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("loginInPatient.json?")
    Observable<BaseListEntity<LoginBean>> loginInPatient(@FieldMap Map<String, String> praise);

    /**
     * 发送验证码
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("registerOfPatientSms.json?")
    Observable<BaseListEntity<SmsBean>> registerOfPatientSms(@FieldMap Map<String, String> praise);

    /**
     * 注册
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("registerOfPatient.json?")
    Observable<BaseListEntity<RegisterBean>> registerOfPatient(@FieldMap Map<String, String> praise);

    /**
     * 查询患者详情
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("loadPatientInfoDetail.json?")
    Observable<BaseListEntity<UserDtlBean>> loadPatientInfoDetail(@FieldMap Map<String, String> praise);

    /**
     * 发送重置密码(病人)验证码
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("resetPasswordOfSms.json?")
    Observable<BaseListEntity<SmsBean>> resetPasswordOfSms(@FieldMap Map<String, String> praise);

    /**
     * 重置密码
     * @param praise
     * @return
     */
    @FormUrlEncoded
    @POST("resetPatientPassword.json?")
    Observable<BaseListEntity<LoginBean>> resetPassword(@FieldMap Map<String, String> praise);
}
